<extend name="Template/index"/>
<block name="title">
    编辑信息
</block>
<block name="resource">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/personalCenter.css"/>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/personalCenterSave.css"/>
</block>
<block name="carousel"></block>
<block name="nav-pos">
<span class="glyphicon glyphicon-home"></span>
    <li>您当前所在位置 ：</li>
	<li><a href="{:U('personalCenter/index')}">个人中心</a></li>
    <li>编辑信息</li>
</block>
<block name="main">
		<div id="main">
			<div class="main">
				<div id="personalCenterDetails">
					<div id="personalCenter">
                       <div id="perSave"><a href="{:U('personalCenter/index')}">个人信息</a></div>
                        <form action="" method="post" enctype="multipart/form-data">
						<ul class="personalCenter">
							<li class="headPortrait">
                            <div>
                            	
                                <img src="__PUBLIC__/{$user.image_id}" class="img-circle" id="headPortrait" height="100">
								<a href="javascript:;"><input type="file" name="image_id" id="fat-btn" class="img-circle"></a>
                                  </div>
   							</li>
							<li><div class="personalCenterTitle">昵称</div><span class="personalCenterContent"><input type="text" name="nickname" class="input" value="{$user.nickname}"></span></li>
                          	<li><div class="personalCenterTitle">性别</div><span class="personalCenterContent"><img src="__PUBLIC__/home/image/nv.gif" class="img-circle" height="40"><input type="radio" class="sex" name="sex"  value="2" <if condition="$user['sex'] eq '2'"> checked</if>> <img src="__PUBLIC__/home/image/nan.gif" class="img-circle" id="sex" height="40"><input type="radio" class="sex"  name="sex" value="1" <if condition="$user['sex'] eq '1'"> checked</if>></span></li>
							<li><div class="personalCenterTitle">年龄</div><span class="personalCenterContent"><select id="year" name="age"></select></span></li>
                            <li><div class="personalCenterTitle">学位</div><span class="personalCenterContent"><select name="degree">
                                <foreach name="degree" item="val"><option value="{$val.degree_id}" <if condition="$val['degree_id'] eq $user['degree']">selected</if>>{$val.degree_name}</option></foreach></select></span></li>
                            <li class="presentAddress"><div class="personalCenterTitle"><a href="">现居地址</a></div><span class="personalCenterContent"><input type="text" name="address" class="input" value="{$user.address}"></span></li>
                           <li><button type="submit" class="btn btn-primary btn-lg btn-block">修改信息</button></li>
								<script>
                                    var date = new Date();						
                                    var y = date.getFullYear()-18;
                                    for (i = 0; i < 80; i++) {
                                    var oP = document.createElement("option");
                                    var oText = document.createTextNode(y);
                                    oP.appendChild(oText);
                                    oP.setAttribute("value", y);
                                    oP.setAttribute("id", y);
                                    document.getElementById('year').appendChild(oP);
                                    y = y - 1;
                                    };
                                    $id ='#'+ (date.getFullYear()-"{$user.age}");
                                    $($id).attr('selected','true');
									$('#personalCenterDetails').css('height',$(document).height()*0.9);
                                 </script>
												
												</ul>
                        </form>
                        
					</div>
				</div>
                
			</div>
		</div>

</block>
